Skip to content

Instantly share code, notes, and snippets.

View HilmiZul's full-sized avatar
💜
purple code

Zul Hilmi HilmiZul

💜
purple code
View GitHub Profile
@gwangjinkim
gwangjinkim / install-termux-arch.md
Created April 25, 2020 14:50 — forked from lisp-is-the-future/install-termux-arch.md
How to install TermuxArch in Termux of Android (Samsung Galaxy Tab 10.1)
#################################################################
# How to install Arch in your Android (into the App TermuxArch)
# and be able to use your Android device like a personal computer
# even running a X server to have GUI
#################################################################


###############################
# Install Termux
import time
print "..."
time.sleep(1)
print "..."
print "..."
print "..."
print "..."
time.sleep(1)
print "..."
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active September 23, 2024 19:04
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@isaacgr
isaacgr / streamer.sh
Created June 2, 2019 22:09
Use FFMPEG to convert an rtsp stream to hls and write output to m3u8 file.
#!/bin/sh
# Convert rtsp stream to hls and write to file
ffmpeg -i "rtsp://admin:admin@192.168.2.77:554/cam/realmonitor?channel=1&subtype=0" -c copy -hls_time 2 -hls_wrap 10 "/var/www/html/streaming.m3u8"
@terabyte128
terabyte128 / JekyllPublisher.py
Last active October 7, 2018 13:41
An easy way to manage your Jekyll website or blog (https://jekyllrb.com). Create new pages and blog posts with front matter already inserted; commit and publish to GitHub Pages.
#!/usr/local/bin/python3
# -*- coding: ascii -*-
import sys
import subprocess
import time
import argparse
def main():
parser = argparse.ArgumentParser(description="Create new Jekyll pages and publish to GitHub")
@LadyScream
LadyScream / lissajous.pde
Created October 3, 2018 20:01
Inspired by Daniel Shiffman on The Coding Train
boolean recording = false;
int frame = 1;
float theta = 0;
float phi = 0;
float time = 0;
float r = 50;
int cols = 5;
int rows = 5;
Lissajou[][] curves;
@HilmiZul
HilmiZul / grav.js
Last active September 29, 2018 20:08
catatan kecil simulasi benda (seolah) jatuh.
/* grav.js
* 30 September 2018, 3:00 A.M.
*/
function grav() {
this.g = 0.9; // gravitasi
this.vel = 0; // init 0 yang nanti ditambah dengan nilai gravitasi saat benda jatoh.
// saat benda jatoh:
// kecapatan benda akan terus bertambah dengan tarikan gravitasi?
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active July 26, 2024 20:17
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@grandmanitou
grandmanitou / gist:8863248
Created February 7, 2014 14:10
Place multiple markers with infowindow on Google Maps API v3, use external links to trigger click and center map on desired location.
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?language=fra&amp;sensor=false"></script>
<script type="text/javascript">
var map;
var Markers = {};
var infowindow;
var locations = [
[
'Samsung Store Madeleine',
'<strong>Samsung Store Madeleine</strong><p>5 Boulevard Malesherbes, 75008 Paris<br>10h – 20h</p>',
48.8701925,
@fabiomontefuscolo
fabiomontefuscolo / models.py
Created January 9, 2012 19:20
Let the Django FileField overwrite files with the same name
# -*- coding: utf-8 -*-
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from django.db import models
class OverwriteStorage(FileSystemStorage):
'''
Muda o comportamento padrão do Django e o faz sobrescrever arquivos de
mesmo nome que foram carregados pelo usuário ao invés de renomeá-los.
'''