Skip to content

Instantly share code, notes, and snippets.

View cyberplanner's full-sized avatar

Sal Abuewilly cyberplanner

  • London
View GitHub Profile
@dwatts1772
dwatts1772 / tagged-release-process.md
Last active April 29, 2022 00:34
Git Releases Tags
@mauricedb
mauricedb / Subject under test
Last active December 7, 2023 14:46
Testing stateful React hooks
import { useState } from 'react';
export function useCounter(initial = 0) {
const [count, setCount] = useState(initial);
return [count, () => setCount(count + 1)];
}
@bradtraversy
bradtraversy / docker-help.md
Last active July 9, 2024 10:18
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@kevinold
kevinold / gist:368387f8da42ce7d24179f3a14359051
Created September 27, 2016 17:26 — forked from negativo/gist:152716565e4091eb9039f55f9781badd
send sms with aws provider in NODEJS
var AWS = require('aws-sdk');
AWS.config.region = 'your aws region';
AWS.config.update({
accessKeyId: "your access id",
secretAccessKey: "your secret access key",
});
var sns = new AWS.SNS();
var params = {
@renshuki
renshuki / ubuntu_agnoster_install.md
Last active July 11, 2024 15:06
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@tmarshall
tmarshall / aws-sns-example.js
Last active October 30, 2022 06:12
aws-sdk sns example, in Node.js
var AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: '{AWS_KEY}',
secretAccessKey: '{AWS_SECRET}',
region: '{SNS_REGION}'
});
var sns = new AWS.SNS();
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@StefanLage
StefanLage / Array-Equilibrium
Last active March 31, 2022 19:59
Technical Interview : Equilibrium index of an Array
int equilibrium (int A[], int n){
int sum = 0;
int solution = -1;
int leftSum = 0;
int rightSum = 0;
// Calculate the sum of all P in A
for (int i = 0; i < n; i++)
sum += A[i];
// Try to find an equilibrium -> if yes return the first one
for (int i = 0; i < n; i++){
@nerocrux
nerocrux / fizzbuzz.rb
Created May 11, 2012 18:15
fizzbuzz without mod (ruby)
def fizzbuzz(fizz,buzz,fizzbuzz,counter)
if fizzbuzz == 15
print("fizzbuzz ")
fizzbuzz = 0
fizz = 0
buzz = 0
elsif fizz == 3
print("fizz ")
fizz = 0
elsif buzz == 5
@rainly
rainly / gist:1990246
Created March 7, 2012 01:16
Installing pgAdmin3 from source on linux(mint)
准备:
libxml2 2.6.18 or above from http://www.xmlsoft.org/
libxslt 1.1.x or above from http://www.xmlsoft.org/
先查看当前系统中是否有安装libxml2,libxslt这两个库,如果没有请到下面的网站中去下载安装
# sudo apt-get install libxml2-dev
# sudo apt-get install libxslt1-dev
由于安装pgAdmin3需要wxGTK,所以也要下载wxGTK
wxGTK 2.8.x from http://www.wxwidgets.org/