Skip to content

Instantly share code, notes, and snippets.

View souhaiebtar's full-sized avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
@abhiomkar
abhiomkar / rsync_copy.sh
Created June 25, 2011 18:17
Rsync - Copy files from remote server with Resume Feature
rsync --partial --progress --rsh=ssh user@hostname:/path/to/file /local/destination/path
@wiledal
wiledal / shake.js
Created March 14, 2015 21:56
Simple shake animation for TweenMax (gsap.js). For modern form error feedback.
function shakeAnimation(element){
TweenMax.to(element, .1, {
x: -7,
ease: Quad.easeInOut
});
TweenMax.to(element, .1, {
repeat: 4,
x: 7,
yoyo: true,
delay: .1,
$ su
$ umount /media/cdrom
$ mount /dev/sr0 /media/cdrom
$ cd /media/cdrom
$ ./install
@mowings
mowings / README.md
Last active December 30, 2020 08:01
Set up xhyve with Ubuntu 16.04

Introduction

Setting up an OS to work with xhyve can be a bit tricky, but it's not impossible. These intructions should be generally applicable to most versions of Linux.

Create a disk image file

Xhyve will use a file as a logical disk. Be sure you have the filesize you need, because growing the file later is tricky to impossible (you could try to use qcow or similar to get around this, but qcow volumes can be tricky to mount).

dd if=/dev/zero of=hdd.img bs=1g count=32 # Create a 32 gig disk. Raise 'count' as desired
@samsonasik
samsonasik / symfony-tips1-prod-dev.md
Last active April 5, 2021 12:50
symfony tips 1 - switch dev - prod or prod - dev again
@pstaender
pstaender / remove_pdf_password.sh
Created November 11, 2013 12:07
Remove password from protected PDF file with GhostScript
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf
@varnit
varnit / convert.c
Last active August 6, 2021 08:46
detect text encoding and convert to utf8
#include "unicode/ucsdet.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iconv.h>
#include <errno.h>
#define DEST_CHARSET "UTF-8"
#define UNKNOWN_CHARSET_DEFAULT "WINDOWS-1252"
@jonathanhoskin
jonathanhoskin / reboot-modem.js
Last active September 29, 2021 13:34
Huawei B315 Modem Reboot Script
// PhantomJS script to reboot a Huawei B315 modem
//
// Author: Jonathan Hoskin / 2017-09-02
// Twitter: @jhossnz
// Github: https://github.com/jonathanhoskin
//
// Requires PhantomJS ~ 2.1.1
//
// Enter your own modem details here
var username = 'admin';
@C-Duv
C-Duv / 0.Notes.md
Created August 1, 2017 23:31
Example for Docker Swarm, Let's Encrypt and Nginx setup with no Nginx down time (answer to https://twitter.com/developius/status/892470102632923136)
@nknapp
nknapp / Dockerfile
Created October 30, 2016 20:15
Traefik setup as reverse-proxy with docker and letsencrypt
FROM traefik:camembert
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443