Skip to content

Instantly share code, notes, and snippets.

@divol
divol / main.js
Created September 29, 2025 16:29 — forked from phil294/main.js
Migrate MongoDB collection to SQLite DB table using Javascript/Deno
import { DB as SqliteDB } from "https://deno.land/x/sqlite/mod.ts"
import { MongoClient } from "https://deno.land/x/mongo@v0.22.0/mod.ts"
const sqlite_db = new SqliteDB("out.db")
sqlite_db.query('drop table if exists posts')
sqlite_db.query("CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT, message TEXT)")
const client = new MongoClient()
await client.connect("mongodb://localhost:27017")
const mongo_db = client.database("my-db")
#!/usr/bin/php
<?php
declare(strict_types = 1);
// require_once ('hhb_.inc.php');
hhb_init ();
if ($argc !== 3) {
fprintf ( STDERR, "usage: %s timestamp url\n", $argv [0] );
fprintf ( STDERR, "example: %s 20091012061648 http://www.p4w.se\n", $argv [0] );
die ( 1 );
}
@divol
divol / gist:88f524ab235def8e7cae353f05b95262
Created April 13, 2018 09:44
Run Eclipse without java installed and no admin right (
unpack the eclipse
exctract the java into eclipse folder, in order to write the following vars
set JAVA_HOME=C:\eclipse
set JDK_HOME=C:\eclipse
set JRE_HOME=C:\eclipse\jre
set CLASSPATH=C:\eclipse\lib;C:\eclipse\jre\lib
set PATH=%PATH%;C:\eclipse\bin;C:\eclipse\jre\bin

Apple's Swift team has an opening for a DevOps engineer! If you are interested, please email: swift-job-apply@group.apple.com

Job Summary

Are you excited about Swift? Imagine what you could do for software development as a member of the Swift team at Apple, where you will have an opportunity to make an impact on both the Swift open source community and on Apple's developer tools products!

As a DevOps quality engineer on the Swift team, you will help engineer solutions to enable better development processes and raise the bar on the quality of the Swift compiler, both as a component of Xcode, and as an open source project. This team architects and maintains a large continuous integration (Jenkins) and automation system, so experience with scaling an infrastructure and automation is highly desired. This role also requires stellar communication, collaboration, and organization skills. The successful candidate is also highly motivated and proactive, detail-oriented, and has a passion for seeking ever hig

recherche avec "awesome-ios"
https://github.com/vsouza/awesome-ios
https://github.com/marktony/Awesome_API/blob/master/Global.md
https://github.com/lyfeyaj/awesome-resources
https://github.com/dkhamsing/open-source-ios-apps
https://katyscode.wordpress.com/2006/10/17/phpcron-running-scheduled-tasks-from-php-on-a-web-server/
http://www.thesitewizard.com/general/set-cron-job.shtml
from : http://superuser.com/questions/46195/why-does-mds-run-wild-in-mac-os-x-10-6
To see what mds and more importantly its child mdworker is actually doing - use fs_usage to log what files it is opening:
sudo fs_usage -w -f filesys mdworker
Though there is a lot of unintelligable stuff in there, it does tell you when it opens a file to begin reading from it. Copying a PDF into my filesystem shows mdworker opening the file then immediately after lots of activity...
p.s. if you want a little less detail, this will just list the open file points:
@divol
divol / howToCompileFreeBoxSDK
Created November 4, 2011 10:02
how to compile freebox sdk
####################################
Modules must be compile in that order :
libela, librudp and foils_hid
for each project, on snow leopard (and my developper moded system) do the following commands:
glibtoolize
autoreconf
automake --add-missing #if needed
autoreconf # bis repetitas
@divol
divol / gist:1071991
Created July 8, 2011 14:44
Create Borderless Transparent Window
Create a new class that inherits from NSWindow and override the method: - (id) initWithContentRect: (NSRect) contentRect styleMask: (unsigned int) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag- (id) initWithContentRect: (NSRect) contentRect
styleMask: (unsigned int) aStyle
backing: (NSBackingStoreType) bufferingType
defer: (BOOL) flag
{
if (![super initWithContentRect: contentRect
styleMask: NSBorderlessWindowMask
backing: bufferingType
defer: flag]) return nil;
[self setBackgroundColor: [NSColor clearColor]];
@divol
divol / gist:1071986
Created July 8, 2011 14:42
Shaking window
source : http://www.cimgf.com/2008/02/27/core-animation-tutorial-window-shake-effect/
static int numberOfShakes = 4;static float durationOfShake = .5f;
static float vigourOfShake = 0.05f;
-(CAKeyframeAnimation *)shakeAnimation:(NSRect)frame
{
CAKeyframeAnimation *shakeAnimation =[CAKeyframeAnimation animation];
CGMutablePathRef shakePath = CGPathCreateMutable();