Skip to content

Instantly share code, notes, and snippets.

View sunny's full-sized avatar
☀️

Sunny Ripert sunny

☀️
View GitHub Profile
@sunny
sunny / liste-de-departements-limitrophes-francais.txt
Last active March 20, 2024 09:47
Liste de départements limitrophes français
01:38,39,69,71,73,74
02:08,51,59,60,77,80
03:18,23,42,58,63,71
04:05,06,26,83,84
05:04,26,38,73
06:04,83
07:26,30,38,42,43,48,84
08:02,51,55
09:11,31,66
10:21,51,52,77,89
@sunny
sunny / Create a design.graphql
Last active February 26, 2024 12:04
Cults query examples
mutation {
createCreation(
name: "Cults Logo"
description: "A Cults logo, to test the API"
imageUrls: ["https://wtf.sunfox.org/3d/cults-logo.jpg"]
fileUrls: ["https://wtf.sunfox.org/3d/cults-logo.stl"]
locale: EN
# Identifier for the “Art” category. Check out the list of categories to find their id.
categoryId: "Q2F0ZWdvcnkvMjM="
# Calcul du nombre de jours par niveau de fréquentation pour Brouillon Coffee.
#
# Pour lancer le script, il faut installer la librairie `jours_feries_france`.
# Dans un terminal, exécuter la commande suivante:
# $ gem install jours_feries_france
#
# Puis, exécuter le script avec la commande suivante pour générer un fichier
# CSV nommé `days.csv`:
# $ ruby brouillon-days.rb > days.csv
@sunny
sunny / us_zip_codes.csv
Created July 18, 2023 09:05
US zip codes to state
code state
00501 NY
00544 NY
01001 MA
01002 MA
01003 MA
01004 MA
01005 MA
01007 MA
01008 MA
class Die
def initialize(count = 1, faces = 1)
@count = count
@faces = faces
end
attr_reader :count, :faces
def rolls
return [count] if faces == 1
class Sudoku
def initialize(lines)
@lines = lines
end
attr_reader :lines
def complete?
groups.all? { |group| complete_group?(group) }
end
outbrain.com, 00512545eb151d5d126f2d066b27600362, DIRECT
tremorhub.com, q017o-78mlk, RESELLER, 1a4e959a1b50034a
teads.tv, 15429, RESELLER, 15a9c44f6d26cbe1
advertising.com, 26154, RESELLER
spotxchange.com, 225721, RESELLER
rubiconproject.com, 17130, RESELLER, 0bfd66d529a55807
lkqd.net, 450, RESELLER, 59c49fa9598a0117
openx.com, 540393169, RESELLER, 6a698e2ec38604c6
spotx.tv, 238936, RESELLER, 7842df1d2fe2db34
spotxchange.com, 238936, RESELLER, 7842df1d2fe2db34
@sunny
sunny / cults_graphql.rb
Created March 27, 2023 20:34
Example Ruby GraphQL call for Cults
# Example GraphQL call using https://github.com/github/graphql-client
require 'graphql/client'
require 'graphql/client/http'
require 'base64'
query_string = <<~QUERY
{
creationsBatch(limit: 3) {
results {
# Example GraphQL call using https://github.com/prisma/python-graphql-client
from sgqlc.endpoint.http import HTTPEndpoint
import base64
query = '''
{
creationsBatch(limit: 3) {
results {
name(locale: EN)
<?php
$query = <<<'JSON'
{
creationsBatch(limit: 3) {
results {
name(locale: EN)
url
creator {
nick